La grille.
grid <- st_read("Grid/grid.shp")
## Reading layer `grid' from data source `/Users/oliviergimenez/Dropbox/OG/GITHUB/human-tursiops-twospeciesoccupancy/Grid/grid.shp' using driver `ESRI Shapefile'
## Simple feature collection with 4356 features and 3 fields
## geometry type: POLYGON
## dimension: XY
## bbox: xmin: 701000 ymin: 5886622 xmax: 1467639 ymax: 6390000
## proj4string: +proj=lcc +lat_1=44 +lat_2=49 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +units=m +no_defs
grid %>%
ggplot() +
geom_sf()
Les dauphins.
load("20180914_SAMM_data_LauretValentin.RData")
Les données été et hiver.
dauphins_summer <- summer
dauphins_winter <- winter
Les données transect uniquement.
transect_summer <- dauphins_summer$segdata %>%
as_tibble() %>%
select(date = date,
transect = Transect.Label,
eastings = X,
northings = Y,
counts = n,
effort = Effort,
id = Sample.Label) %>%
add_column(season = "summer")
transect_winter <- dauphins_winter$segdata %>%
as_tibble() %>%
select(date = date,
transect = Transect.Label,
eastings = X,
northings = Y,
counts = n,
effort = Effort,
id = Sample.Label) %>%
add_column(season = "winter")
transect <- bind_rows(transect_summer, transect_winter)
Quelques statistiques, avec le nombre de détections par transect.
transect %>%
count(transect, wt = counts, sort = TRUE)
## # A tibble: 1,780 x 2
## transect n
## <chr> <dbl>
## 1 522 5
## 2 4495 4
## 3 2846 3
## 4 3769 3
## 5 4278 3
## 6 5625 3
## 7 2025 2
## 8 2032 2
## 9 2059 2
## 10 2061 2
## # … with 1,770 more rows
Le nombre total de dauphins.
transect %>%
count(transect, wt = counts, sort = TRUE) %>%
select(n) %>%
sum()
## [1] 105
Et l’effort par transect.
transect %>%
group_by(transect) %>%
summarise(nb_detections = sum(counts),
effort_total = mean(effort)) %>%
arrange(desc(nb_detections))
## # A tibble: 1,780 x 3
## transect nb_detections effort_total
## <chr> <dbl> <dbl>
## 1 522 5 12.6
## 2 4495 4 7.21
## 3 2846 3 10.3
## 4 3769 3 9.78
## 5 4278 3 10.6
## 6 5625 3 10.2
## 7 2025 2 13.6
## 8 2032 2 9.37
## 9 2059 2 10.4
## 10 2061 2 10.0
## # … with 1,770 more rows
L’effort total.
transect %>%
group_by(transect) %>%
summarise(effort_total = max(effort)) %>%
select(effort_total) %>%
sum()
## [1] 15353.45
Visualisation.
grid %>%
ggplot() +
geom_sf(lwd = 0.1, color = "black", fill = "white") +
geom_line(data = transect, color = "blue",
aes(x = eastings, y = northings, group = transect)) +
coord_sf(xlim = st_bbox(grid)[c(1,3)],
ylim = st_bbox(grid)[c(2,4)]) +
geom_point(data = transect %>% filter(counts > 0),
aes(x = eastings, y = northings, size = counts / effort),
color = "red", alpha = 0.6) +
labs(size = "dolphin encounter rate") +
facet_wrap(~season, ncol = 1)
Les activités.
load("20200928_SAMM_data_Pressure.RData")
On récupère les activités par saison en les regroupant dans une catégorie unique pêche. Il y a le détail : “Bouee de peche”, Bateau art dormant (fileyeur, caseyeur)“,”Bateau chalutier“,”Bateau de peche pro“,”Bateau senneur, bolincheur".
activ_summer <- transect %>%
filter(season == "summer") %>%
mutate(id = as.numeric(id),
dolphins = if_else(counts>0, 1, 0)) %>%
select(date, id, eastings, northings, effort, dolphins, transect) %>%
full_join(summer_fishingactivities$obsdata, by = c("id" = "Sample.Label")) %>%
select(date,
eastings,
northings,
dolphins,
what,
effort,
id,
transect) %>%
mutate(peche = if_else(!is.na(what), 1, 0)) %>%
add_column(season = "summer") %>%
select(date, eastings, northings, dolphins, effort, peche, season, id, transect)
activ_winter <- transect %>%
filter(season == "winter") %>%
mutate(id = as.numeric(id),
dolphins = if_else(counts>0, 1, 0)) %>%
select(date, id, eastings, northings, effort, dolphins, transect) %>%
full_join(winter_fishingactivities$obsdata, by = c("id" = "Sample.Label")) %>%
select(date,
eastings,
northings,
dolphins,
what,
effort,
id,
transect) %>%
mutate(peche = if_else(!is.na(what), 1, 0)) %>%
add_column(season = "winter") %>%
select(date, eastings, northings, dolphins, effort, peche, season, id, transect)
#summer_fishingactivities$obsdata %>%
# st_as_sf()
# st_transform( crs= st_crs(grid))
activ <- bind_rows(activ_summer, activ_winter)
Visualisation.
grid %>%
ggplot() +
geom_sf(lwd = 0.1, color = "black", fill = "white") +
geom_line(data = activ, color = "blue",
aes(x = eastings, y = northings, group = transect)) +
coord_sf(xlim = st_bbox(grid)[c(1,3)],
ylim = st_bbox(grid)[c(2,4)]) +
geom_point(data = activ %>% filter(peche > 0),
aes(x = eastings, y = northings),
color = "red", alpha = 0.6) +
facet_wrap(~season, ncol = 1) +
labs(title = "fishing activities")